[APPS] Default apps plugin auth to OAuth without keys#427
Conversation
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| ### apps.authOverrides.method | ||
|
|
||
| > default: `apiKey` | ||
| > default: `apiKey` when both `DD_API_KEY` and `DD_APP_KEY` are configured, otherwise `oauth` |
There was a problem hiding this comment.
if OAuth is loaded when nothing is configured, then I think the default is oauth now.
| > default: `apiKey` when both `DD_API_KEY` and `DD_APP_KEY` are configured, otherwise `oauth` | |
| > default: `oauth` |
There was a problem hiding this comment.
Wouldn't it be when DD_API_KEY and DD_APP_KEY are set, the default is apiKey, otherwise the default is oauth?
yoannmoinet
left a comment
There was a problem hiding this comment.
LGTM.
I have a comment, but it's not blocking.
Could be a follow-up to avoid duplications and enforce existing patterns.
🎉 All green!🧪 All tests passed 🔗 Commit SHA: e419fb8 | Docs | Datadog PR Page | Give us feedback! |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|

Motivation
Datadog Apps local development and upload should use OAuth by default when API/App keys are not configured. This matches the intended customer setup where
npm run devandnpm run uploadcan start an OAuth browser flow instead of failing with missing key guidance.Changes
The apps plugin now resolves
apps.authOverrides.methodin this order:Explicit config and environment overrides still win, and users can force API/App-key auth with
DD_APPS_AUTH_METHOD=apiKey. The README documents the conditional default, and the validation tests cover configured keys, env keys, incomplete auth, explicit override precedence, and env isolation.QA Instructions
In a Datadog App using
@datadog/vite-plugin, runnpm run devornpm run uploadwithoutDD_API_KEY/DD_APP_KEY; the apps plugin should select OAuth. Set both keys and rerun to confirm API/App-key auth remains the default. SetDD_APPS_AUTH_METHOD=apiKeyorDD_APPS_AUTH_METHOD=oauthto confirm explicit method selection still wins.Blast Radius
This affects the Datadog Apps plugin auth default for app upload and local backend function execution. Other build plugin products keep their existing auth behavior because the override remains scoped to
apps.authOverrides.method.Documentation